extends ../layout
block content
	.container
		.row
			.panel.panel-default
				.panel-heading
					h3 #{keyword}
				.panel-body
					if movies && movies.length > 0
						each item in movies
							.col-md-2
								.thumbnail
									a(href="/movie/#{item._id}")
											if item.poster.indexOf('https:') > -1
												img(src="#{item.poster}",alt="#{item.title}" style="width:150px;height:95px")
											else
												img(src="/upload/#{item.poster}",alt="#{item.title}" style="width:150px;height:95px")
				ul.pagination
					- for (var i = 1; i <totalPage+1; i++) {
						- if (currentPage === (i)) {
							li.active
								span #{currentPage}
						- }else{
							li
								a(href='/results?p=#{i-1}&#{query}') #{i}
						- }
					- }